<?php
namespace Mobile\Controller;
use Common\Model\SettingModel;
use Common\Model\SlideModel;

class IndexController extends BaseController {
    /**
     * 首页
     */
    public function index()
    {
        $set_model = new SettingModel();
        $video = $set_model->getSetting('home_video');
        $video_thumb = $set_model->getSetting('home_video_thumb');

        $slide = (new SlideModel())->getSlide(2);

        $this->assign('company', $set_model->getSetting('website_info.page.company.content'));
        $this->assign('video', $video);
        $this->assign('video_thumb', $video_thumb);
        $this->assign('slide', $slide);
        $this->display();
    }

    /**
     *法律声明
     */
    public function law()
    {
        $set_model = new SettingModel();
        $this->assign('info', $set_model->getSetting('website_info.page.law.content'));
        $this->display();
    }

    /**
     *站点地图
     */
    public function page()
    {
        $page = I('page');
        if($page){
            $set_model = new SettingModel();
            $this->assign('info', $set_model->getSetting('website_info.page.'.$page.'.content'));
            $this->assign('page', $page);
            $this->assign('pages', C('WEBSITE.page'));
        }

        $this->display();
    }

    /**
     *公司风采
     */
    public function elegant()
    {
        $set_model = new SettingModel();
        $this->assign('info', $set_model->getSetting('website_info.page.elegant.content'));
        $this->display();
    }

    /**
     *联系我们
     */
    public function contact()
    {
        $set_model = new SettingModel();
        $this->assign('info', $set_model->getSetting('website_info.page.contact.content'));
        $this->display();
    }

    /**
     *站点地图
     */
    public function map()
    {
        $this->display();
    }


}